\hypertarget{app_8h}{}\section{applications/app.h File Reference}
\label{app_8h}\index{applications/app.\+h@{applications/app.\+h}}
{\ttfamily \#include \char`\"{}conf\+\_\+general.\+h\char`\"{}}\\*
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{app_8h_af8fc1a2e63214d6e241822c440de0b74}{app\+\_\+init} (\hyperlink{structapp__configuration}{app\+\_\+configuration} $\ast$conf)
\item 
const \hyperlink{structapp__configuration}{app\+\_\+configuration} $\ast$ \hyperlink{app_8h_a38ac3d31b372807d480c2a29bce0d3df}{app\+\_\+get\+\_\+configuration} (void)
\item 
void \hyperlink{app_8h_accb388d39d47d710024a075f51b9f2c9}{app\+\_\+set\+\_\+configuration} (\hyperlink{structapp__configuration}{app\+\_\+configuration} $\ast$conf)
\item 
void \hyperlink{app_8h_af7e0bd7532879c0a867917c2127a8713}{app\+\_\+ppm\+\_\+start} (void)
\item 
void \hyperlink{app_8h_aa6c0f55f01fce1070617ed74a9e723f3}{app\+\_\+ppm\+\_\+configure} (\hyperlink{structppm__config}{ppm\+\_\+config} $\ast$conf)
\item 
void \hyperlink{app_8h_ad9cf2cbbc4fbfadafddf610d1b52a7b6}{app\+\_\+adc\+\_\+start} (bool use\+\_\+rx\+\_\+tx)
\item 
void \hyperlink{app_8h_a97e337d374d339412ec581e59813e733}{app\+\_\+adc\+\_\+configure} (\hyperlink{structadc__config}{adc\+\_\+config} $\ast$conf)
\item 
float \hyperlink{app_8h_afce881994c8db3b8205ed896220ca2ce}{app\+\_\+adc\+\_\+get\+\_\+decoded\+\_\+level} (void)
\item 
float \hyperlink{app_8h_aa993a9c1d4ac51c09007d1e56932b868}{app\+\_\+adc\+\_\+get\+\_\+voltage} (void)
\item 
void \hyperlink{app_8h_aafc2ba40e7574d504fa6deb1e5ac11c5}{app\+\_\+uartcomm\+\_\+start} (void)
\item 
void \hyperlink{app_8h_a5295d6ee8b6b127bd3e7a5c093716fbe}{app\+\_\+uartcomm\+\_\+configure} (uint32\+\_\+t baudrate)
\item 
void \hyperlink{app_8h_a23777267f18f9d2d2455f474cc58c362}{app\+\_\+nunchuk\+\_\+start} (void)
\item 
void \hyperlink{app_8h_a4b83149efe713656b44533c4f6029fe9}{app\+\_\+nunchuk\+\_\+configure} (\hyperlink{structchuk__config}{chuk\+\_\+config} $\ast$conf)
\item 
float \hyperlink{app_8h_a473fbbed88469ede4861aab07cb4f8e6}{app\+\_\+nunchuk\+\_\+get\+\_\+decoded\+\_\+chuk} (void)
\item 
void \hyperlink{app_8h_a35f2368ab07c718db8ec82ce1748b9c8}{app\+\_\+nunchuk\+\_\+update\+\_\+output} (\hyperlink{structchuck__data}{chuck\+\_\+data} $\ast$data)
\item 
void \hyperlink{app_8h_ae63b13ed982163b6e2b18c8bb8b8e0fb}{app\+\_\+gurgalof\+\_\+init} (void)
\item 
void \hyperlink{app_8h_abac1a68335cabd879f4bc4749dfb450e}{app\+\_\+sten\+\_\+init} (void)
\end{DoxyCompactItemize}


\subsection{Function Documentation}
\hypertarget{app_8h_a97e337d374d339412ec581e59813e733}{}\index{app.\+h@{app.\+h}!app\+\_\+adc\+\_\+configure@{app\+\_\+adc\+\_\+configure}}
\index{app\+\_\+adc\+\_\+configure@{app\+\_\+adc\+\_\+configure}!app.\+h@{app.\+h}}
\subsubsection[{app\+\_\+adc\+\_\+configure(adc\+\_\+config $\ast$conf)}]{\setlength{\rightskip}{0pt plus 5cm}void app\+\_\+adc\+\_\+configure (
\begin{DoxyParamCaption}
\item[{{\bf adc\+\_\+config} $\ast$}]{conf}
\end{DoxyParamCaption}
)}\label{app_8h_a97e337d374d339412ec581e59813e733}
\hypertarget{app_8h_afce881994c8db3b8205ed896220ca2ce}{}\index{app.\+h@{app.\+h}!app\+\_\+adc\+\_\+get\+\_\+decoded\+\_\+level@{app\+\_\+adc\+\_\+get\+\_\+decoded\+\_\+level}}
\index{app\+\_\+adc\+\_\+get\+\_\+decoded\+\_\+level@{app\+\_\+adc\+\_\+get\+\_\+decoded\+\_\+level}!app.\+h@{app.\+h}}
\subsubsection[{app\+\_\+adc\+\_\+get\+\_\+decoded\+\_\+level(void)}]{\setlength{\rightskip}{0pt plus 5cm}float app\+\_\+adc\+\_\+get\+\_\+decoded\+\_\+level (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{app_8h_afce881994c8db3b8205ed896220ca2ce}
\hypertarget{app_8h_aa993a9c1d4ac51c09007d1e56932b868}{}\index{app.\+h@{app.\+h}!app\+\_\+adc\+\_\+get\+\_\+voltage@{app\+\_\+adc\+\_\+get\+\_\+voltage}}
\index{app\+\_\+adc\+\_\+get\+\_\+voltage@{app\+\_\+adc\+\_\+get\+\_\+voltage}!app.\+h@{app.\+h}}
\subsubsection[{app\+\_\+adc\+\_\+get\+\_\+voltage(void)}]{\setlength{\rightskip}{0pt plus 5cm}float app\+\_\+adc\+\_\+get\+\_\+voltage (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{app_8h_aa993a9c1d4ac51c09007d1e56932b868}
\hypertarget{app_8h_ad9cf2cbbc4fbfadafddf610d1b52a7b6}{}\index{app.\+h@{app.\+h}!app\+\_\+adc\+\_\+start@{app\+\_\+adc\+\_\+start}}
\index{app\+\_\+adc\+\_\+start@{app\+\_\+adc\+\_\+start}!app.\+h@{app.\+h}}
\subsubsection[{app\+\_\+adc\+\_\+start(bool use\+\_\+rx\+\_\+tx)}]{\setlength{\rightskip}{0pt plus 5cm}void app\+\_\+adc\+\_\+start (
\begin{DoxyParamCaption}
\item[{bool}]{use\+\_\+rx\+\_\+tx}
\end{DoxyParamCaption}
)}\label{app_8h_ad9cf2cbbc4fbfadafddf610d1b52a7b6}
\hypertarget{app_8h_a38ac3d31b372807d480c2a29bce0d3df}{}\index{app.\+h@{app.\+h}!app\+\_\+get\+\_\+configuration@{app\+\_\+get\+\_\+configuration}}
\index{app\+\_\+get\+\_\+configuration@{app\+\_\+get\+\_\+configuration}!app.\+h@{app.\+h}}
\subsubsection[{app\+\_\+get\+\_\+configuration(void)}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf app\+\_\+configuration}$\ast$ app\+\_\+get\+\_\+configuration (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{app_8h_a38ac3d31b372807d480c2a29bce0d3df}
\hypertarget{app_8h_ae63b13ed982163b6e2b18c8bb8b8e0fb}{}\index{app.\+h@{app.\+h}!app\+\_\+gurgalof\+\_\+init@{app\+\_\+gurgalof\+\_\+init}}
\index{app\+\_\+gurgalof\+\_\+init@{app\+\_\+gurgalof\+\_\+init}!app.\+h@{app.\+h}}
\subsubsection[{app\+\_\+gurgalof\+\_\+init(void)}]{\setlength{\rightskip}{0pt plus 5cm}void app\+\_\+gurgalof\+\_\+init (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{app_8h_ae63b13ed982163b6e2b18c8bb8b8e0fb}
\hypertarget{app_8h_af8fc1a2e63214d6e241822c440de0b74}{}\index{app.\+h@{app.\+h}!app\+\_\+init@{app\+\_\+init}}
\index{app\+\_\+init@{app\+\_\+init}!app.\+h@{app.\+h}}
\subsubsection[{app\+\_\+init(app\+\_\+configuration $\ast$conf)}]{\setlength{\rightskip}{0pt plus 5cm}void app\+\_\+init (
\begin{DoxyParamCaption}
\item[{{\bf app\+\_\+configuration} $\ast$}]{conf}
\end{DoxyParamCaption}
)}\label{app_8h_af8fc1a2e63214d6e241822c440de0b74}
\hypertarget{app_8h_a4b83149efe713656b44533c4f6029fe9}{}\index{app.\+h@{app.\+h}!app\+\_\+nunchuk\+\_\+configure@{app\+\_\+nunchuk\+\_\+configure}}
\index{app\+\_\+nunchuk\+\_\+configure@{app\+\_\+nunchuk\+\_\+configure}!app.\+h@{app.\+h}}
\subsubsection[{app\+\_\+nunchuk\+\_\+configure(chuk\+\_\+config $\ast$conf)}]{\setlength{\rightskip}{0pt plus 5cm}void app\+\_\+nunchuk\+\_\+configure (
\begin{DoxyParamCaption}
\item[{{\bf chuk\+\_\+config} $\ast$}]{conf}
\end{DoxyParamCaption}
)}\label{app_8h_a4b83149efe713656b44533c4f6029fe9}
\hypertarget{app_8h_a473fbbed88469ede4861aab07cb4f8e6}{}\index{app.\+h@{app.\+h}!app\+\_\+nunchuk\+\_\+get\+\_\+decoded\+\_\+chuk@{app\+\_\+nunchuk\+\_\+get\+\_\+decoded\+\_\+chuk}}
\index{app\+\_\+nunchuk\+\_\+get\+\_\+decoded\+\_\+chuk@{app\+\_\+nunchuk\+\_\+get\+\_\+decoded\+\_\+chuk}!app.\+h@{app.\+h}}
\subsubsection[{app\+\_\+nunchuk\+\_\+get\+\_\+decoded\+\_\+chuk(void)}]{\setlength{\rightskip}{0pt plus 5cm}float app\+\_\+nunchuk\+\_\+get\+\_\+decoded\+\_\+chuk (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{app_8h_a473fbbed88469ede4861aab07cb4f8e6}
\hypertarget{app_8h_a23777267f18f9d2d2455f474cc58c362}{}\index{app.\+h@{app.\+h}!app\+\_\+nunchuk\+\_\+start@{app\+\_\+nunchuk\+\_\+start}}
\index{app\+\_\+nunchuk\+\_\+start@{app\+\_\+nunchuk\+\_\+start}!app.\+h@{app.\+h}}
\subsubsection[{app\+\_\+nunchuk\+\_\+start(void)}]{\setlength{\rightskip}{0pt plus 5cm}void app\+\_\+nunchuk\+\_\+start (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{app_8h_a23777267f18f9d2d2455f474cc58c362}
\hypertarget{app_8h_a35f2368ab07c718db8ec82ce1748b9c8}{}\index{app.\+h@{app.\+h}!app\+\_\+nunchuk\+\_\+update\+\_\+output@{app\+\_\+nunchuk\+\_\+update\+\_\+output}}
\index{app\+\_\+nunchuk\+\_\+update\+\_\+output@{app\+\_\+nunchuk\+\_\+update\+\_\+output}!app.\+h@{app.\+h}}
\subsubsection[{app\+\_\+nunchuk\+\_\+update\+\_\+output(chuck\+\_\+data $\ast$data)}]{\setlength{\rightskip}{0pt plus 5cm}void app\+\_\+nunchuk\+\_\+update\+\_\+output (
\begin{DoxyParamCaption}
\item[{{\bf chuck\+\_\+data} $\ast$}]{data}
\end{DoxyParamCaption}
)}\label{app_8h_a35f2368ab07c718db8ec82ce1748b9c8}
\hypertarget{app_8h_aa6c0f55f01fce1070617ed74a9e723f3}{}\index{app.\+h@{app.\+h}!app\+\_\+ppm\+\_\+configure@{app\+\_\+ppm\+\_\+configure}}
\index{app\+\_\+ppm\+\_\+configure@{app\+\_\+ppm\+\_\+configure}!app.\+h@{app.\+h}}
\subsubsection[{app\+\_\+ppm\+\_\+configure(ppm\+\_\+config $\ast$conf)}]{\setlength{\rightskip}{0pt plus 5cm}void app\+\_\+ppm\+\_\+configure (
\begin{DoxyParamCaption}
\item[{{\bf ppm\+\_\+config} $\ast$}]{conf}
\end{DoxyParamCaption}
)}\label{app_8h_aa6c0f55f01fce1070617ed74a9e723f3}
\hypertarget{app_8h_af7e0bd7532879c0a867917c2127a8713}{}\index{app.\+h@{app.\+h}!app\+\_\+ppm\+\_\+start@{app\+\_\+ppm\+\_\+start}}
\index{app\+\_\+ppm\+\_\+start@{app\+\_\+ppm\+\_\+start}!app.\+h@{app.\+h}}
\subsubsection[{app\+\_\+ppm\+\_\+start(void)}]{\setlength{\rightskip}{0pt plus 5cm}void app\+\_\+ppm\+\_\+start (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{app_8h_af7e0bd7532879c0a867917c2127a8713}
\hypertarget{app_8h_accb388d39d47d710024a075f51b9f2c9}{}\index{app.\+h@{app.\+h}!app\+\_\+set\+\_\+configuration@{app\+\_\+set\+\_\+configuration}}
\index{app\+\_\+set\+\_\+configuration@{app\+\_\+set\+\_\+configuration}!app.\+h@{app.\+h}}
\subsubsection[{app\+\_\+set\+\_\+configuration(app\+\_\+configuration $\ast$conf)}]{\setlength{\rightskip}{0pt plus 5cm}void app\+\_\+set\+\_\+configuration (
\begin{DoxyParamCaption}
\item[{{\bf app\+\_\+configuration} $\ast$}]{conf}
\end{DoxyParamCaption}
)}\label{app_8h_accb388d39d47d710024a075f51b9f2c9}
Reconfigure all apps. Note that this will not start apps that are not already running, that should be done at boot. Some apps don\textquotesingle{}t have any configuration options.


\begin{DoxyParams}{Parameters}
{\em conf} & The new configuration to use. \\
\hline
\end{DoxyParams}
\hypertarget{app_8h_abac1a68335cabd879f4bc4749dfb450e}{}\index{app.\+h@{app.\+h}!app\+\_\+sten\+\_\+init@{app\+\_\+sten\+\_\+init}}
\index{app\+\_\+sten\+\_\+init@{app\+\_\+sten\+\_\+init}!app.\+h@{app.\+h}}
\subsubsection[{app\+\_\+sten\+\_\+init(void)}]{\setlength{\rightskip}{0pt plus 5cm}void app\+\_\+sten\+\_\+init (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{app_8h_abac1a68335cabd879f4bc4749dfb450e}
\hypertarget{app_8h_a5295d6ee8b6b127bd3e7a5c093716fbe}{}\index{app.\+h@{app.\+h}!app\+\_\+uartcomm\+\_\+configure@{app\+\_\+uartcomm\+\_\+configure}}
\index{app\+\_\+uartcomm\+\_\+configure@{app\+\_\+uartcomm\+\_\+configure}!app.\+h@{app.\+h}}
\subsubsection[{app\+\_\+uartcomm\+\_\+configure(uint32\+\_\+t baudrate)}]{\setlength{\rightskip}{0pt plus 5cm}void app\+\_\+uartcomm\+\_\+configure (
\begin{DoxyParamCaption}
\item[{uint32\+\_\+t}]{baudrate}
\end{DoxyParamCaption}
)}\label{app_8h_a5295d6ee8b6b127bd3e7a5c093716fbe}
\hypertarget{app_8h_aafc2ba40e7574d504fa6deb1e5ac11c5}{}\index{app.\+h@{app.\+h}!app\+\_\+uartcomm\+\_\+start@{app\+\_\+uartcomm\+\_\+start}}
\index{app\+\_\+uartcomm\+\_\+start@{app\+\_\+uartcomm\+\_\+start}!app.\+h@{app.\+h}}
\subsubsection[{app\+\_\+uartcomm\+\_\+start(void)}]{\setlength{\rightskip}{0pt plus 5cm}void app\+\_\+uartcomm\+\_\+start (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{app_8h_aafc2ba40e7574d504fa6deb1e5ac11c5}
